package urls;

public class UrlUtils {
    public static String joinUrl(String url,String url1){
        url = url.replace("\\","/");
        url1 = url1.replace("\\","/");
        StringBuilder builder  = new StringBuilder();
        builder.append(url);
        if(!url.endsWith("/")){
            builder.append("/");
        }
        if(url1.startsWith("/")){
            url1 = url1.substring(1);
        }
        builder.append(url1);
        return builder.toString();
    }
}
